package com.mall.vo;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

@Data
//小辣椒的注解
public class Result {
    //用于统一返回结果 的对象
    private int code;  //结果码
    private String message;
    private Map<String, Object> dataMap = new HashMap<>();  //任意字符串  任意对象
    public Result() {
    }
    public Result(int code, String message) {
        this.code = code;
        this.message = message;
    }

    /**
     * 获取
     * @return code
     */
    public int getCode() {
        return code;
    }

    /**
     * 设置
     * @param code
     */
    public void setCode(int code) {
        this.code = code;
    }

    /**
     * 获取
     * @return message
     */
    public String getMessage() {
        return message;
    }

    /**
     * 设置
     * @param message
     */
    public void setMessage(String message) {
        this.message = message;
    }

    /**
     * 获取
     * @return dataMap
     */
    public Map<String, Object> getDataMap() {
        return dataMap;
    }

    /**
     * 设置
     * @param dataMap
     */
    public void setDataMap(Map<String, Object> dataMap) {
        this.dataMap = dataMap;
    }

    public String toString() {
        return "Myresult{code = " + code + ", message = " + message + ", dataMap = " + dataMap + "}";
    }
}
